﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using com.eforceglobal.crux.views.Administration;
using com.eforceglobal.crux.controllers;
using com.eforceglobal.crux.controllers.Administration;

public partial class Administration_Default : BaseView, IDefaultAdministration
{
    DefaultAdministrationController _controller = null;

    protected void Page_Load(object sender, EventArgs e)
    {
        _controller = new DefaultAdministrationController(this);
        _controller.InitView(IsPostBack);
    }
    
    protected void lnkManageCompanies_Click(object sender, EventArgs e)
    {
        _controller.OpenManageCompanies();
    }

    #region IDefaultAdministration Members

    public bool ShowManageAllCompanies
    {
        set { pnlManageAllCompanies.Visible = value; }
    }

    #endregion

    #region IDefaultAdministration Members

    public int UserID
    {
        get 
        {
            SessionData sessionData = new SessionData();
            return sessionData.CurrentUser.UserID;
        }
    }

    #endregion
    protected void lnkManageMyCompany_Click(object sender, EventArgs e)
    {
        _controller.OpenManageMyCompany();
    }
    protected void lnkResetMyPassword_Click(object sender, EventArgs e)
    {
        _controller.OpenResetMyPassword();
    }

    #region IDefaultAdministration Members


    public bool ShowManageMyCompany
    {
        set { pnlManageMyCompany.Visible = value; }
    }

    public bool ShowResetMyPassword
    {
        set { pnlResetMyPassword.Visible = value; }
    }

    #endregion
}
